package com.cloud;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.List;

import javax.swing.JButton;
import javax.swing.JFrame;

public class CustomMouseListener implements MouseListener{

	//private CustomJPanel two;
	//JFrame frame;
	private String selectedString = "";
	private List<domain.Tag> AllWords;
	private Integer TypeID;
	
	public CustomMouseListener(/*CustomJPanel two, JFrame frame, */String selectedString, List<domain.Tag> AllWords, Integer TypeID) {
		
		super();
		//this.two = two;
		//this.two.setS(string);
		//System.out.println("panel two::");
		//this.frame = frame;
			this.selectedString = selectedString;
			this.AllWords=AllWords;
			this.TypeID=TypeID;
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		alex.WordDiffs NextW = new alex.WordDiffs(selectedString, TypeID, AllWords);
		NextW.setVisible(true);
		//System.out.println("mouseReleased");
		//two.setS(s);
		//frame.setContentPane(two);
		//System.out.println(two);
        //two.revalidate();
        //System.out.println("post click:" +two);
        // JLabel l2 = new JLabel(two.getS());  
         //JButton b2 = new JButton("Back to cloud");  
//         b2.addActionListener( new ActionListener() {  
//               
//                    @Override  
//             public void actionPerformed(ActionEvent arg0) {  
//                 frame.setContentPane(panel);  
//                 panel.revalidate();  
//             }  
//         });  
        // two.add(l2);  
        // two.add(b2);  
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

}
